Package eu.europa.ec.taxud.cesop.readers
Class XmlStreamReaderWrapper
java.lang.Object
eu.europa.ec.taxud.cesop.readers.XmlStreamReaderWrapper
Wrapper for stream reader.
-
Constructor Summary
ConstructorsConstructorDescriptionXmlStreamReaderWrapper(InputStream inputStream, org.codehaus.stax2.validation.XMLValidationSchema xsdSchema) -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of attributes.Returns the element characters.Returns the current end tag name.Returns the current start tag name.booleanGoes to the next XML start element.booleangoToNextStartElement(QName qName) Goes to the next XML start element with specified QName.booleanhasNext()Returns true if there are more parsing events and false if there are no more events.booleanReturns true if the current event type is a characters element or a CDATA section, false otherwise.booleanReturns true if the current event type is an end element, false otherwise.booleanReturns true if the current event type is a start element, false otherwise.voidMark as peek.voidMoves to the next element.
-
Constructor Details
-
XmlStreamReaderWrapper
public XmlStreamReaderWrapper(InputStream inputStream, org.codehaus.stax2.validation.XMLValidationSchema xsdSchema) throws XMLStreamException - Throws:
XMLStreamException
-
-
Method Details
-
markAsPeek
public void markAsPeek()Mark as peek. -
hasNext
Returns true if there are more parsing events and false if there are no more events. This method will return false if the current state of the XMLStreamReader is END_DOCUMENT.- Returns:
- true if there are more events, false otherwise
- Throws:
XMLStreamException- in case of error while processing the XML content
-
moveToNextElement
Moves to the next element. This method will throw an IllegalStateException if it is called after hasNext() returns false.- Throws:
XMLStreamException- in case of error while processing the XML content
-
isStartElement
public boolean isStartElement()Returns true if the current event type is a start element, false otherwise.- Returns:
- true if the current event type is a start element.
-
isCharactersElement
public boolean isCharactersElement()Returns true if the current event type is a characters element or a CDATA section, false otherwise.- Returns:
- true if the current event type is a characters element or a CDATA section.
-
isEndElement
public boolean isEndElement()Returns true if the current event type is an end element, false otherwise.- Returns:
- true if the current event type is an end element.
-
goToNextStartElement
Goes to the next XML start element.- Returns:
- true if a start element is found, false otherwise
- Throws:
XMLStreamException- in case of error while processing the XML content
-
goToNextStartElement
Goes to the next XML start element with specified QName.- Parameters:
qName- the name of the start element to search for- Returns:
- true if the start element is found, false otherwise
- Throws:
XMLStreamException- in case of error while processing the XML content
-
getStartElementName
Returns the current start tag name.- Returns:
- the tag name
- Throws:
XMLStreamException- if the current event type is not a start element
-
getEndElementName
Returns the current end tag name.- Returns:
- the tag name
- Throws:
XMLStreamException- if the current event type is not an end element
-
getCharacters
Returns the element characters.- Returns:
- the element characters
- Throws:
XMLStreamException- if the current event type is not a characters element
-
getAttributes
Returns the list of attributes.- Returns:
- a list of attributes (name, value)
- Throws:
XMLStreamException- if the current event type is not an attribute element
-